#ifndef IMAGESAVEMANAGER_H
#define IMAGESAVEMANAGER_H

#include <QObject>
#include "Utils/singleton.h"
#include "imagesaveworkerthread.h"

#pragma pack(1)
typedef struct _RUN_ENV
{
	int totalTimes;
	int successTimes;
	int failTimes;
	int ballDamageTimes;
	int capDamageTimes;
	int substrateDamageTimes;
	bool bSite0;
	int cacthIndex;
	//int checkItems;
	QString lotId;
	QString productNum;
	QString packageName;
	QString operatorName;
	QDateTime startTime;
	QDateTime endTime;
}RUN_ENV;
#pragma pack()

class ImageSaveManager :  public QObject, public Singleton<ImageSaveManager>
{
    Q_OBJECT
public:
	void SaveSummaryInfo(RUN_ENV re);
    void AddImageList(QList<HalconCpp::HImage> imagePadList, QList<HalconCpp::HImage> imageCapList, QList<HalconCpp::HImage> imageSubList, QString lotName, QDateTime time, int result, HalconCpp::HImage imageResult, int chipType);
signals:

public slots:
protected:
    friend class Singleton<ImageSaveManager>;
    ImageSaveManager();
    ImageSaveWorkerThread *m_thread = new ImageSaveWorkerThread(this);
};

#endif // IMAGESAVEMANAGER_H
